home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 / Ham Radio 2000.iso / ham2000 / misc / dspice0s / nxtchr.c < prev    next >
C/C++ Source or Header  |  1992-11-21  |  3KB  |  117 lines

  1. /* nxtchr.f -- translated by f2c (version of 3 February 1990  3:36:42).
  2.    You must link the resulting object file with the libraries:
  3.     -lF77 -lI77 -lm -lc   (in that order)
  4. */
  5.  
  6. #include "f2c.h"
  7.  
  8. /* Common Block Declarations */
  9.  
  10. struct {
  11.     doublereal achar, afield[15], oldlin[15];
  12.     integer kntrc, kntlim;
  13. } line_;
  14.  
  15. #define line_1 line_
  16.  
  17. /* Table of constant values */
  18.  
  19. static integer c__1 = 1;
  20.  
  21. /*<       integer function nxtchr(int) >*/
  22. integer nxtchr_(int_)
  23. integer *int_;
  24. {
  25.     /* Initialized data */
  26.  
  27.     static struct {
  28.     char e_1[40];
  29.     doublereal e_2;
  30.     } equiv_5 = { {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ',', ' ', ' ', 
  31.         ' ', ' ', ' ', ' ', ' ', '=', ' ', ' ', ' ', ' ', ' ', ' ', 
  32.         ' ', '(', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ')', ' ', ' ', 
  33.         ' ', ' ', ' ', ' ', ' '}, 0. };
  34.  
  35. #define adelim ((doublereal *)&equiv_5)
  36.  
  37.     static struct {
  38.     char e_1[8];
  39.     doublereal e_2;
  40.     } equiv_6 = { {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '}, 0. };
  41.  
  42. #define ablnk (*(doublereal *)&equiv_6)
  43.  
  44.  
  45.     /* System generated locals */
  46.     integer ret_val;
  47.  
  48.     /* Local variables */
  49.     extern /* Subroutine */ int move_();
  50.     static integer i;
  51.  
  52. /*<       implicit double precision (a-h,o-z) >*/
  53.  
  54. /*     this routine advances the current line scan pointer one column */
  55. /*     and checks whether or not the next character is a delimiter */
  56.  
  57. /* spice version 2g.6  sccsid=line 3/15/83 */
  58. /*<       common /line/ achar,afield(15),oldlin(15),kntrc,kntlim >*/
  59.  
  60. /*<       dimension adelim(5) >*/
  61. /*<       data adelim / 1h , 1h,, 1h=, 1h(, 1h) / >*/
  62. /*<       data ablnk / 1h  / >*/
  63. /*<       data ichar /0/ >*/
  64.  
  65. /*  advance scan pointer (kntrc) */
  66.  
  67. /*<       kntrc=kntrc+1 >*/
  68.     ++line_1.kntrc;
  69. /*<       if (kntrc.gt.kntlim) go to 30 >*/
  70.     if (line_1.kntrc > line_1.kntlim) {
  71.     goto L30;
  72.     }
  73. /*<       call move(achar,1,afield,kntrc,1) >*/
  74.     move_(&line_1.achar, &c__1, line_1.afield, &line_1.kntrc, &c__1);
  75. /*<     5 do 10 i=1,5 >*/
  76. /* L5: */
  77.     for (i = 1; i <= 5; ++i) {
  78. /*<       if (achar.eq.adelim(i)) go to 20 >*/
  79.     if (line_1.achar == adelim[i - 1]) {
  80.         goto L20;
  81.     }
  82. /*<    10 continue >*/
  83. /* L10: */
  84.     }
  85.  
  86. /*  non-delimiter */
  87.  
  88. /*<       nxtchr=1 >*/
  89.     ret_val = 1;
  90. /*<       return >*/
  91.     return ret_val;
  92.  
  93. /*  delimiter */
  94.  
  95. /*<    20 nxtchr=0 >*/
  96. L20:
  97.     ret_val = 0;
  98. /*<       return >*/
  99.     return ret_val;
  100.  
  101. /*  end-of-line */
  102.  
  103. /*<    30 nxtchr=-1 >*/
  104. L30:
  105.     ret_val = -1;
  106. /*<       achar=ablnk >*/
  107.     line_1.achar = ablnk;
  108. /*<       return >*/
  109.     return ret_val;
  110. /*<       end >*/
  111. } /* nxtchr_ */
  112.  
  113. #undef ablnk
  114. #undef adelim
  115.  
  116.  
  117.